<template>
    <div>
        <button @click="dialogtrue = true">触发弹出框</button>
        <topdialog :dialogtrue="dialogtrue" @del="dialogfalse">
            <div slot="cont">这是一段内容</div>
            <div slot="butadd">
                <button>确定</button>
                <button @click="cancel">取消</button>
            </div>


        </topdialog>
    </div>
</template>

<script>
import topdialog from "../components/Mydialog/topdialog.vue"
export default {
    data() {
        return {
            dialogtrue: false
        }
    },
    methods: {
        // 关闭弹出层
        dialogfalse(flag) {
            this.dialogtrue = flag
        },
        // 取消弹出层
        cancel() {
            this.dialogtrue = !this.dialogtrue
        },
        tccfalse(flag) {
            this.dialogtrue = flag
        }
    },
    created() {

    },
    mounted() {

    },
    components: {
        topdialog
    },
    computed: {

    },
    watch: {

    },
}
</script>

<style lang='scss' scoped></style>
